#ifndef DOMTREEWIDGET_H
#define DOMTREEWIDGET_H

#include <QTreeWidget>
#include <QDomNode>

#include "DomTreeWidgetItem.h"
#include "DomTreeProperties.h"

class DomTreeWidget : public QTreeWidget
{
    Q_OBJECT
public:
    explicit DomTreeWidget(QWidget *parent = 0);

    void setRootNode(const QDomNode &rootNode);
    
signals:
    void nodeSelected(const QDomNode& node);
    
public slots:

private slots:
    void itemClickedSlot(QTreeWidgetItem * item, int column);

private:

    void generateItemTree(DomTreeWidgetItem* parentItem, const QDomNode &parentNode);
    DomTreeWidgetItem* newItem(const QDomNode &domNode);

    DomTreeProperties* mpTreeProperties;
    
};

#endif // DOMTREEWIDGET_H
